package com.tinysand.advert.mysql.constant;

import java.util.HashMap;
import java.util.Map;

/**
 * @author TINY
 */
public class Constant {
    public static final String DB_NAME = "advert_data";

    public interface AD_PLAN_TABLE_INFO {
        String TABLE_NAME = "ad_plan";

        String COLUMN_USER_ID = "user_id";

        String COLUMN_ID = "id";

        String COLUMN_PLAN_STATUS = "plan_status";

        String COLUMN_START_DATE = "start_date";

        String COLUMN_END_DATE = "end_date";
    }

    public interface AD_CREATIVE_TABLE_INFO {
        String TABLE_NAME = "ad_creative";

        String COLUMN_TYPE = "type";

        String COLUMN_ID = "id";

        String COLUMN_MATERIAL_TYPE = "material_type";

        String COLUMN_HEIGHT = "height";

        String COLUMN_WIDTH = "width";
        String COLUMN_AUDIT_STATUS = "audit_status";
        String COLUMN_URL = "url";
    }

    public interface AD_UNIT_TABLE_INFO {
        String TABLE_NAME = "ad_unit";

        String COLUMN_UNIT_STATUS = "unit_status";

        String COLUMN_ID = "id";

        String COLUMN_POSITION_TYPE = "position_type";

        String COLUMN_PLAN_ID = "plan_id";
    }

    public interface AD_CREATIVE_UNIT_TABLE_INFO {
        String TABLE_NAME = "creative_unit";

        String COLUMN_CREATIVE_ID = "creative_id";

        String COLUMN_UNIT_ID = "unit_id";
    }

    public interface AD_UNIT_DISTRICT_TABLE_INFO {
        String TABLE_NAME = "ad_unit_district";

        String COLUMN_UNIT_ID = "unit_id";

        String COLUMN_PROVINCE = "province";

        String COLUMN_CITY = "city";
    }

    public interface AD_UNIT_IT_TABLE_INFO {
        String TABLE_NAME = "ad_unit_it";

        String COLUMN_UNIT_ID = "unit_id";

        String COLUMN_IT_TAG = "it_tag";
    }

    public interface AD_UNIT_KEYWORD_TABLE_INFO {
        String TABLE_NAME = "ad_unit_keyword";

        String COLUMN_UNIT_ID = "unit_id";

        String COLUMN_KEYWORD = "keyword";
    }

    public static Map<String, String> table2Db = new HashMap<>();
    static {
        table2Db.put(AD_PLAN_TABLE_INFO.TABLE_NAME, DB_NAME);
        table2Db.put(AD_CREATIVE_TABLE_INFO.TABLE_NAME, DB_NAME);
        table2Db.put(AD_UNIT_TABLE_INFO.TABLE_NAME, DB_NAME);
        table2Db.put(AD_CREATIVE_UNIT_TABLE_INFO.TABLE_NAME, DB_NAME);
        table2Db.put(AD_UNIT_DISTRICT_TABLE_INFO.TABLE_NAME, DB_NAME);
        table2Db.put(AD_UNIT_IT_TABLE_INFO.TABLE_NAME, DB_NAME);
        table2Db.put(AD_UNIT_KEYWORD_TABLE_INFO.TABLE_NAME, DB_NAME);
    }
}
